package com.qinggeng.project.system.service;

import com.qinggeng.project.api.dto.AddOrdersInfoGoodsDto;
import com.qinggeng.project.system.domain.GoodsPercent;
import com.qinggeng.project.system.domain.Orders;
import com.qinggeng.project.system.domain.OrdersGoods;

import java.math.BigDecimal;
import java.util.List;

public interface IGoodsPercentService {

    /**
     * 新增
     * @param goodsPercent
     * @return
     */
    boolean insertGoodsPercent(GoodsPercent goodsPercent);

    /**
     * 批量删除
     * @param id
     * @return
     */
    int deleteGoodsPercentByIds(Long[] id);

    /**
     * 更新
     * @param goodsPercent
     * @return
     */
    boolean updateGoodsPercent(GoodsPercent goodsPercent);

    boolean updateGoodsPercentage(Long classifyId);

    /**
     * 查询商品百分比列表
     * @param goodsPercent
     * @return
     */
    List<GoodsPercent> selectGoodsPercentList(GoodsPercent goodsPercent);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    GoodsPercent getGoodsPercentById(Long id);


    /**
     * 根据商品ID查询分类提成百分比
     * @param goodsId
     * @return
     */
    GoodsPercent selectGoodsPercentByGoodsId(Long goodsId);



    /**
     * 根据商品分类计算订单的抽奖次数
     *
     *
     * @return
     */
    Integer getDrawTimes(Orders orders);
}
